Leakage compensation for sample and hold devices

ABSTRACT

A sample and hold circuit in one aspect includes first and second switches. The first switch can be coupled to receive an input signal and to sample the input signal using a first capacitor. A first leakage current flows between first and second conductive terminals of the first switch and accumulates as a first leakage charge in the first capacitor. A second leakage current flows between the first and second conductive terminals of the second switch and accumulates as a second leakage charge in the second capacitor. An offset circuit produces a compensated sampled value by subtracting a quantity from a signal developed in response to the held sampled signal and charge accumulated through the first switch, wherein the quantity is developed in response to the accumulated leakage charge in the second capacitor.

BACKGROUND INFORMATION

1. Field of the Disclosure

The present invention relates generally to sampling of electronic valuesand, more particularly, the present invention relates to storage ofsample values.

2. Background

Electronic sampling is used by many electronic systems. Well knownapplications include applications such as audio, data acquisition,control, and the like. In some applications, a sampled value may need tobe held for a relatively long period of time. For example, duringregulation of a power supply, an analog peak input voltage may need tobe detected. The sampled value may need to be held for a relatively longperiod of time (e.g., 10 ms). A sample and hold circuit can operate byconverting the signal value to a current, which is then used to charge acapacitor so the sample can be stored. A switch can be used toselectively control when the capacitor is used to sample. In particular,the switch may be closed to allow the capacitor to charge, and opened toallow the capacitor to retain the sampled charge. The switch may also beclosed again to release the sampled charge from the capacitor.

However, when using this particular sample and hold technique on anintegrated circuit, there is normally a leakage current flowing throughthe switch, such that the amount of charge stored in the capacitorchanges. For example, leakage current can cause additional charge toflow into and to be stored by the storage capacitor even after theswitch has been opened. As the length of time that the value has beenstored increases, the stored value increases due to additional chargebuildup. When the stored charge has been held for a substantial time,the stored value may no longer be an accurate representation of theinitially sampled value because of the additional charge buildupresulting from the leakage current. In another example, leakage currentmay flow from the capacitor and charge may flow out of the capacitor asduration of time increases, thus making the stored value substantiallyless than the initially sampled value after a longer time duration.

The effect of leakage current on the stored charge can be reduced byincreasing the capacitance of the storage capacity. However, theresulting increased size of the capacitor can result in correspondinglyhigher costs for integrated circuit that incorporates the increased sizecapacitors. The effect of leakage current on the storage charge can alsobe reduced by improving the design of the storage capacitor. However,the improved design typically results in higher design and processingcosts for manufacturing the integrated circuit that incorporates thecapacitors having an improved design. As can be seen, these approachesgenerally increase costs and/or size of the circuit design.

BRIEF DESCRIPTION OF THE DRAWINGS

Non-limiting and non-exhaustive embodiments of the present invention aredescribed with reference to the following figures, wherein likereference numerals refer to like parts throughout the various viewsunless otherwise specified.

FIG. 1 is a schematic diagram that illustrates a sample and hold circuitin accordance with an embodiment of the present invention.

FIG. 2 is a schematic diagram of the sample and hold circuit of FIG. 1which identifies particular currents and voltages to illustrate theoperation in accordance with one embodiment of the present invention.

FIG. 3 is a flow diagram illustrating an example flow of the operationof the sample and hold circuit of FIG. 1 in accordance with oneembodiment of the present invention.

DETAILED DESCRIPTION

Methods and apparatuses for holding a sampled value for a long durationon a capacitor and substantially reducing the effects of switch leakagecurrent on the stored value are disclosed. In the following description,numerous specific details are set forth in order to provide a thoroughunderstanding of the present invention. It will be apparent, however, toone having ordinary skill in the art that the specific detail need notbe employed to practice the present invention. In other instances,well-known materials or methods have not been described in detail inorder to avoid obscuring the present invention.

Reference throughout this specification to “one embodiment”, “anembodiment”, “one example” or “an example” means that a particularfeature, structure or characteristic described in connection with theembodiment or example is included in at least one embodiment of thepresent invention. Thus, appearances of the phrases “in one embodiment”,“in an embodiment”, “one example” or “an example” in various placesthroughout this specification are not necessarily all referring to thesame embodiment or example. Furthermore, the particular features,structures or characteristics may be combined in any suitablecombinations and/or subcombinations in one or more embodiments orexamples. In addition, it is appreciated that the figures providedherewith are for explanation purposes to persons ordinarily skilled inthe art and that the drawings are not necessarily drawn to scale.

An example technique for holding a sampled value for a long duration ona holding capacitor and substantially reducing the effects of switchleakage current on the stored value is now described. Examples of thepresent invention involve sampling and holding of a particular value byusing a modeled leakage current to compensate for leakage current acrossthe sample and hold switch. In another embodiment the switch may becoupled to enable a voltage representative of a certain value to bestored. More specifically the switch is “enabled” when the switch isconducting and the switch is “disabled” when the switch is substantiallynot conducting. The switch can be enabled (for example) by applying ahigh voltage (e.g., logic “1”) to a control terminal of the switch. Theswitch can be disabled (for example) by applying a low voltage (e.g.,logic “0”) to a control terminal of the switch. The switch may then bedisabled to hold the sampled value. Although limited embodiments aredisclosed, the disclosure can also apply to other applications wheremaintaining a sampled analog value for a sustained period of time on anintegrated circuit is desired.

A sample and hold circuit in one aspect includes first and secondswitches. The first switch can be coupled to receive an input signal andto sample the input signal using a first capacitor. A first leakagecurrent flows between first and second conductive terminals of the firstswitch that accumulates as a first leakage charge in the firstcapacitor. A second leakage current flows between the first and secondconductive terminals of the second switch that accumulates as a secondleakage charge in the second capacitor. An offset circuit produces anoffset sampled value by subtracting a quantity representing the chargeaccumulated on the second switch from a quantity representing the heldsampled signal and charge accumulated through the first switch.

FIG. 1 shows one example of an integrated sample and hold circuit 100 inaccordance with the teachings of the present invention. The sample andhold circuit 100 uses analog holding circuitry 110, in a configurationto sample an input signal INPUT₀ which is provided by input circuitry120. In one example, input signal INPUT₀ may be, but is not limited to,representative of a peak of a rectified time varying input voltage.Input signal INPUT₀ is sampled utilizing switch SW₁ and the sampledvalue is stored utilizing capacitor C₁. However, switch SW₁ is typicallynot a perfect switch and allows current to leak between the conductiveterminals, even when the switch is open. The leakage current can bemodeled, for example, by a resistor coupled in parallel with theconductive terminals of the switch. As shown, a first conductingterminal of switch SW₁ is coupled to a voltage source V_(DD).

Sample and hold controller 130 is configured to provide control signalsfor controlling analog holding circuitry 110. For example, sample andhold controller 130 provides a control signal SAMPLE that opens andcloses switch SW₁ when a particular value represented by initiallysampled input signal INPUT₀ is selected to be sampled by sample and holdcontroller 130. Sample and hold controller 130 also provides a RESETsignal, which is used to open and close switches SW₃ and SW₄. Inoperation switch SW₃ is closed to set capacitor C₁ to an internalvoltage V_(INT). Similarly, switch SW₄ is closed to set capacitor C₂ tointernal voltage V_(INT). In one example, a single voltage source may beused to supply both capacitors C₁ and C₂ to internal voltage V_(INT).

In one example, switches SW₃ and SW₄ are enabled at the same time toallow capacitors C₁ and C₂ to be set to the same voltage (V_(INT)). Oncecapacitors C₁ and C₂ have been set to the same voltage, internal voltageV_(INT), switches SW₃ and SW₄ are disabled. In operation, switch SW₁ maynow be selectively enabled by SAMPLE signal for a certain duration oftime to allow the particular value represented by initially sampledvalue signal INPUT₀ to be stored on capacitor C₁. In one example,switches SW₃ and SW₄ are enabled and disabled to set capacitors C₁ andC₂ before a new value is to be stored on capacitor C₁.

As shown, analog holding circuitry 110 further comprises switch SW₂ thatis configured to remain open to provide a leakage current that modelsthe leakage current I_(LEAKA) of switch SW₁. The leakage current ofswitch SW₂ is substantially equal to the leakage current of switch SW₁because switch SW₂ is designed to have operating characteristics thatare substantially similar to the operating characteristics of switchSW₁. In operation, during a time duration when capacitor C₁ is storing avoltage in response to initially sampled value INPUT₀, switch SW₂ isleft open to collect leakage current I_(LEAKB) on capacitor C₂. Morespecifically, switch SW₂ is configured to remain open to provide aleakage current I_(LEAKB) that models the leakage current I_(LEAKA) ofswitch SW₁ over a time duration. The leakage current I_(LEAKB) of switchSW₂ is substantially equal to the leakage current I_(LEAKA) of switchSW₁ because switch SW₂ is designed to have operating characteristicsthat are substantially similar to the operating characteristics ofswitch SW₁. In another example, leakage current I_(LEAKA) and I_(LEAKB)may be directly proportional to each other.

As shown, a first terminal of capacitor C₁ is coupled to an invertingterminal of OFFSET CIRCUIT 145. A first terminal of capacitor C₂ iscoupled to a first input of OFFSET CIRCUIT 145. OFFSET CIRCUIT 145 isarranged to provide an stored input signal (INPUT) to SENSING CIRCUITRY140. More specifically, OFFSET CIRCUIT 145 is configured to subtract thechange of initially sample value INPUT₀ due to leakage current so thatover a time duration stored input value are substantially equal toinitially sampled value INPUT₀. In other words, stored input signalINPUT is offset by a certain value to represent the value of initiallysampled input signal INPUT₀ after a time duration.

In operation, the voltage across capacitor C₁ is representative ofinitially sampled input signal INPUT₀ when initially stored. As timeduration increases, leakage current I_(LEAKA) from switch SW₁ increasesthe voltage across capacitor C₁ thus, distorting the original valuestored on capacitor C₁. Since capacitor C₂ accumulates a charge formleakage current I_(LEAKB) that is the substantially the same as a chargecapacitor C₁ accumulates form leakage current I_(LEAKA) over a certaintime period, then offset circuit may subtract the voltage accumulated oncapacitor C₂ from the voltage on capacitor C₁ such that the differencerepresented as the stored input signal INPUT is substantially the samevalue as the initially sampled value INPUT₀.

In one embodiment, stored input signal INPUT corresponds to theinitially sampled input signal INPUT₀ by compensating for the leakageacross the sampling switch SW₁. SENSING CIRCUITRY 140 is provided tointerpret the stored input signal INPUT (which can represent, forexample, a peak input voltage of a power converter during a cycle of thepower converter).

In operation, sample and hold controller 130 asserts the RESET signal(e.g., by setting the RESET signal to a high voltage), which closesswitch SW₃ and switch SW₄. Closing switches SW₃ and SW₄ sets the voltageand/or charge of capacitor C₁ and capacitor C₂ to a voltage V_(int). Asshown, V_(int) can be two separate internal voltage sources with thesame voltage value or, in another embodiment, a single voltage sourcethat is coupled to the two holding capacitors, C₁ and C₂.

Switches SW₃ and SW₄ are included to reset capacitors C₁ and C₂ to thesame voltage before a sample voltage (such as the intially sampled inputsignal INPUT₀) is received by capacitor C₁. Switches SW₃ and SW₄ aretypically the same type of switch because both switches SW₃ and SW₄ mayallow leakage current to flow into capacitors C₁ and C₂ or current toflow out of capacitors C₁ and C₂, thus changing the voltage acrosscapacitor C₁ and C₂. In various embodiments, a scaled version of theswitch to be modeled can be used (such as by using a current mirror thatis scaled in accordance with the scale of the modeling switch).

Once capacitors C₁ and C₂ have been reset to a common voltage V_(INT),sample and hold controller 130 disables signal RESET (opens SW₃ and SW₄)and selectively asserts the SAMPLE signal. Thus, sample and holdcontroller 130 controls the timing of the SAMPLE signal and thus thetiming of when the analog holding circuitry 110 samples the initiallysampled input signal INPUT₀. When the SAMPLE signal is enabled, anelectrical quantity (INPUT₀) provided by input circuitry 120 is sampled.In one embodiment, the magnitude of the electrical quantity is typicallydetermined by input circuitry 120 (although in various embodiments,input circuitry 120 can be combined with sample and hold controller 130or other circuitry). Thus, sample and hold controller 130 controls thesampling time of capacitor C₁ by controlling the duration of the timethat switch SW₁ is enabled (e.g., closed) to enable the charging ofcapacitor C₁.

The sampled electrical quantity can be a current and/or voltage and maybe represented as a current and/or voltage. According to one embodiment,a peak voltage of a rectified AC line voltage is converted to a currentand is input into analog holding circuitry 110, where it is typicallyheld for around 10 ms.

In one embodiment the voltage across SW₁ when it is disabled can beidentical to the voltage across SW₂ when it is disabled. In anotherembodiment, the voltage across SW₂ may be different and the value acrosscapacitor C₂ can be scaled accordingly before it is subtracted from thevalue across C₁.

Analog holding circuitry 110 further comprises a second sample and holdcircuit including switch SW₂, which is normally open, and a capacitorC₂. Switch SW₂ is typically the same design as switch SW₁ to allow foran accurate representation of the leakage current across switch SW₁. Thesecond sample and hold circuit is utilized to determine the amount ofleakage current being collected by capacitor C₁ during a time period inwhich the sample is held.

When the switches used by both sample and hold circuits are similar(e.g., when switch SW₁ and SW₂ have substantially similar designs), theamount of voltage change from the second sample and hold circuit can besubtracted from the voltage on the first sample and hold circuit todetermine any change in voltage on the first capacitor C₁ due to leakagecurrent. Thus, by subtracting the voltage across the second capacitor C₂(capacitor C₂ holds the voltage from the switch leakage current) fromthe voltage across the first capacitor C₁ (capacitor C₁ is holding thestored value plus additional voltage due to switch leakage current), thestored value is derived by negating the effect of the leakage current.

FIG. 2 is a schematic diagram of the sample and hold circuit of FIG. 1which identifies particular currents and voltages to illustrate theoperation in accordance in one embodiment of the present invention. Asexplained above with respect to FIG. 1, the RESET signal is a pulsedsignal to enable and disable switch SW₃ and switch SW₄ to reset thevalues of capacitor C₁ and capacitor C₂. The SAMPLE signal is thenapplied to enable switch SW₁ such that capacitor C₁ is used to sampleand store a voltage that is present at the drain of transistor 204.Transistor 204 is arranged in a current mirror arrangement (forbuffering) under the control of transistor 202. A voltage from voltagesupply V_(DD) 201 is applied to transistors 202 and 204 of the currentmirror. In various embodiments, voltage supply V_(DD) 201 can be thesame as or different from a voltage supply Vcc 203, which is illustratedas supplying power to translator circuits 302 and 304. As discussedbelow, the current through the current mirror is controlled in responseto current signal I_(INPUT0). In particular, current I_(INPUT0) isrepresentative of initially sampled input signal INPUT₀.

The voltage produced at the drain of transistor 204 is applied to bothan input terminal of switch SW₁ and an input terminal of switch SW₂.When switch SW₁ is closed in response to an assertion of the SAMPLEsignal, capacitor C₁ samples the voltage that is produced in response tocurrent I_(INPUT0). When switch SW₁ is opened in response to a negationof the SAMPLE signal, capacitor C₁ holds the sampled voltage, which issubject to leakage of charge into capacitor C₁ across the opened switchSW₁.

The sampled voltage is applied to the gate of transistor T1 (transistorT1 has a high impedance input to prevent leakage of current fromcapacitor C₁) of translator circuit 302. Transistor T1 develops avoltage at the source of transistor T1 in response to the gate voltageand the current supplied by current source I_(INT). The developedvoltage is used to control the current mirror formed by bipolartransistors 206 and 208. The current flowing through the current mirrorformed by transistors 206 and 208 is also controlled by the currentsource I_(SINK) which is coupled to the emitter of transistor 208. Thecurrent mirror develops a voltage V_(IPROP) across resistor R₁ inresponse to the current which is mirrored through transistor 206.Voltage V_(IPROP) developed across resistor R1 is substantiallyproportional to voltage on capacitor C₁. A current mirror formedutilizing transistors 207 and 209 produces current I1, which representsthe voltage across capacitor C₁. The current mirror formed usingtransistors 207 and 209 can be implemented using a current ratio of 1:1,although other ratios may be used.

As mentioned above, the voltage produced at the drain of transistor 204is applied to an input terminal of switch SW₂. Leakage current acrossswitch SW₂ (which is normally open) causes charge stored by capacitor C₂to gradually rise. The voltage (V2) associated with the stored charge ofcapacitor C₂ is applied to the gate of transistor T2 (transistor T2 hasa high impedance input to prevent leakage) of translator circuit 304.Transistor T2 develops a voltage at the source of transistor T2 inresponse to the gate voltage and the current supplied by current sourceI_(INT). The developed voltage is used to control the current mirrorformed by bipolar transistors 210 and 212. The current flowing throughthe current mirror formed by transistors 210 and 212 is also controlledby the current source I_(SINK) that is coupled to the emitter oftransistor 210. The current mirror develops a voltage across resistor R2in response to the current that is mirrored through transistor 212. Inparticular, the voltage across resistor R2 is substantially proportionalto the voltage across capacitor C₂. A current mirror that is formedusing transistors 214 and 216 produces mirrored current that is used (inturn) to control the current flowing through another current mirror thatis formed using transistors 217 and 219. The current mirror that isformed using transistors 217 and 219 produces the current I2, whichrepresents the voltage across capacitor C₂. The current mirror that isformed using transistors 217 and 219 can be implemented using a currentratio of 1:1, although other ratios can be used.

When the ratios of the current mirror that is formed using transistors207 and 209 and the current mirror that is formed using transistors 217and 219 are equal (for example), current I2 can be subtracted fromcurrent I1 to produce a current (I_(DIFF)) that substantially representsthe current I_(INPUT0). When resistor R1 is equal to resistor R2(R1=R2=R), I_(DIFF) is equal to I1 minus I2, and thus is equal to(V1−V2)/R. Thus, I_(DIFF) is representative of the difference betweenthe voltages across V1 and V2, which is representative of the initiallysampled input signal INPUT₀.

Current I_(DIFF) is coupled to a current mirror formed by transistors220, 222, and 224. The gate of transistor 220 is directly connected tothe drain of transistor 220 such that transistor 220 functions as thecontrolling transistor of the current mirror. Thus transistors 222 and224 are biased in response to the current I_(DIFF). Because the leakagecurrent across switches SW₁ and SW₂ is the same (or scaledappropriately), the change in voltage over time (such as within a 10 msperiod) in both capacitors is the same. Because of initial setupconditions, current I_(DIFF) represents an initial voltage sampled bycapacitor C₁.

When initializing the circuit, current I_(DIFF) is normally a null valueas a result of switches SW₃ and SW₄ presetting capacitors C₁ and C₂ tothe same voltage. Because capacitors C₁ and C₂ are equal, translators302 and 304 produce currents I1 and I2 to be equal, resulting in nocurrent difference. Therefore, final input current INPUT isrepresentative of the initially sampled input signal I_(INPUT0) at thetime SAMPLE signal was asserted until capacitors C₁ and C₂ are reset byenabling and disabling switches SW₃ and SW₄ by asserting the RESETsignal. The current mirror formed by transistors 226 and 228 buffers theI_(INPUT0) signal and controls the current mirror formed by transistors202 and 204. Thus current I_(INPUT0) is mirrored such that the mirroredcurrent in response to current I_(INPUT0) can be sampled by pulsingswitch SW₁. After I_(INPUT0) is sampled, the voltage on capacitor C₁ isincreased in response to the mirrored current. The increase on capacitorC₁ causes current I1 to increase, thus causing current I_(DIFF) toincrease proportionately to the increase on current I1. The voltagesacross capacitors C₁ and C₂ change at the same rate after initiallysampled input I_(INPUT0) has been sampled by capacitor C₁ such that thecurrent I_(DIFF) does not substantially change over a period of time.

FIG. 3 is a flow diagram illustrating an example flow of the operationof the sample and hold circuit of FIG. 1 in accordance with oneembodiment of the present invention. In operation 310, first and secondcapacitors are preset to a first value. (The first value can bedifferent from or the same as the value in the other capacitor.) Inoperation 320, a signal to be sampled is received and buffered. Inoperation 330, a first sample switch is closed and then opened to samplethe buffered signal to be sampled. In operation 340, the sampled signalis held for a substantial time. A substantial time period can be a timeperiod that is long enough for leakage across the sampling and presetswitches to change the stored value. In operation 350, leakage acrossthe sample switch is modeled using the second storage capacitor andsubtracted from a value derived from the first storage capacitor toproduce a compensated value. In operation 360, the compensated value issensed by sensing circuitry.

The above description of illustrated examples of the present invention,including what is described in the Abstract, are not intended to beexhaustive or to be limiting as to the precise forms disclosed. Whilespecific embodiments of, and examples for, the invention are describedherein for illustrative purposes, various equivalent modifications arepossible without departing from the broader spirit and scope of thepresent invention. Indeed, it is appreciated that the specific voltages,currents, frequencies, power range values, times, etc., are provided forexplanation purposes and that other values may also be employed in otherembodiments and examples in accordance with the teachings of the presentinvention.

These modifications can be made to examples of the invention in light ofthe above detailed description. The terms used in the following claimsshould not be construed to limit the invention to the specificembodiments disclosed in the specification and the claims. Rather, thescope is to be determined entirely by the following claims, which are tobe construed in accordance with established doctrines of claiminterpretation. The present specification and figures are accordingly tobe regarded as illustrative rather than restrictive.

1. A sample and hold integrated circuit, comprising: a first switchhaving a first conductive terminal coupled to a buffer for receiving abuffered input signal and a second conductive terminal coupled to afirst storage capacitor for sampling the buffered input signal, whereinthe first switch is closed to produce a sampled input signal by samplingthe buffered input signal and opened to decouple the first capacitorfrom the buffered input signal such that the sampled signal is held bythe first capacitor, and wherein a first leakage current flows betweenthe first and second conductive terminals of the first switch and toaccumulate a first leakage charge in the first capacitor; a secondswitch having a first conductive terminal coupled to a voltage referenceand a second conductive terminal coupled to a second storage capacitorfor storing a second leakage current, wherein the second leakage currentflows between the first and second conductive terminals of the secondswitch and to accumulate a second leakage charge in the secondcapacitor; and an offset circuit for producing a compensated sampledvalue by subtracting a quantity from a signal developed in response tothe held sampled signal, wherein the quantity is developed in responseto the accumulated leakage charge in the second capacitor.
 2. Thecircuit of claim 1 further comprising a third switch that is coupled topreset the first capacitor to a first initial voltage.
 3. The circuit ofclaim 2 further comprising a fourth switch that is coupled to preset thesecond capacitor to a second initial voltage.
 4. The circuit of claim 3wherein the third and forth switches preset the first and secondcapacitors to the first and second initial voltages every 10 ms(milliseconds).
 5. The circuit of claim 1 wherein a first current isdeveloped in response to a voltage across the first capacitor and asecond current is developed in response to a voltage across the secondcapacitor.
 6. The circuit of claim 5 wherein the compensated sampledvalue is produced by subtracting the first current developed in responseto the voltage across the first capacitor from the second currentdeveloped in response to the voltage across the second capacitor.
 7. Thecircuit of claim 5 wherein the first current developed in response tothe voltage across the first capacitor is developed by coupling a highimpedance input of a first transistor to the first terminal of the firstcapacitor.
 8. The circuit of claim 7 wherein the first current developedin response to the voltage across the first capacitor is furtherdeveloped by using a first bipolar current mirror to mirror a currentproduced by the first transistor.
 9. The circuit of claim 1 wherein thesecond current developed in response to the voltage across the secondcapacitor is developed by coupling a high impedance input of a secondtransistor to the first terminal of the second capacitor and by using asecond bipolar current mirror to mirror a current produced by the secondtransistor.
 10. The circuit of claim 1 wherein the compensated sampledvalue is used to produce an output current representative of thecompensated sampled value.
 11. The circuit of claim 1, wherein thecompensated sampled value is used to control a voltage coupled to thefirst terminal of the first switch.
 12. The circuit of claim 1, whereinthe first switch is opened and closed every cycle of a power converter.13. A method for compensating for leakage in a sample and hold circuit,comprising: buffering a received input signal; closing a first switch tosample the buffered input signal to produce a sampled input signal,wherein the first switch is closed to produce the sampled input signalusing a first capacitor such that the sampled input signal is held bythe first capacitor; accumulating a first leakage charge in the firstcapacitor in response to a first leakage current that flows betweenfirst and second conductive terminals of the first switch; accumulatinga second leakage charge in a second capacitor in response to a secondleakage current that flows between first and second conductive terminalsof the second switch; and producing a compensated sampled value bysubtracting a quantity from a signal developed in response to the heldsampled signal and the accumulated first leakage charge, wherein thequantity is developed in response to the accumulated leakage charge inthe second capacitor.
 14. The method of claim 13 further comprisingpresetting the first capacitor to a first initial voltage.
 15. Themethod of claim 14 further comprising presetting the second capacitor toa second initial voltage.
 16. The method of claim 13 further comprisingdeveloping a first current in response to a voltage across the firstcapacitor and developing a second current in response to a voltageacross the second capacitor.
 17. The method of claim 16 wherein thecompensated sampled value is produced by subtracting the first currentdeveloped in response to the voltage across the first capacitor from thesecond current developed in response to the voltage across the secondcapacitor.
 18. The method of claim 17 wherein the first currentdeveloped in response to the voltage across the first capacitor isfurther developed by using a first bipolar current mirror to mirror acurrent produced by the first transistor.
 19. A sampling circuit for usein an integrated circuit, comprising: a first switch coupled to receivean input signal and coupled to a first storage capacitor for samplingthe input signal, wherein the first switch is closed to produce a chargein the first capacitor in response to the input signal such that sampledsignal is held by the first capacitor, and wherein the first switchallows a first leakage current to flow between first and secondconductive terminals of the first switch and to accumulate a firstleakage charge in the first capacitor; a second switch coupled to asecond storage capacitor for storing a second leakage current, whereinthe second switch allows the second leakage current to flow between thefirst and second conductive terminals of the second switch and toaccumulate a second leakage charge in the second capacitor; and a offsetcircuit for producing a compensated sampled value by subtracting aquantity from a signal developed in response to the held sampled signaland charge accumulated through the first switch, wherein the quantity issubtracted in response to the accumulated leakage charge in the secondcapacitor.
 20. The switching circuit of claim 19 wherein third and forthswitches preset the first and second capacitors, respectively, to firstand second initial voltages every 10 ms (milliseconds).
 21. Theswitching circuit of claim 20 wherein the offset sampled value isproduced by subtracting a first current developed in response to thevoltage across the first capacitor from a second current developed inresponse to the voltage across the second capacitor.
 22. The switchingcircuit of claim 19 wherein the offset sampled value is used to producean output current representative of the compensated sampled value.